<!DOCTYPE html>
<html>
<head>
	<title>Star Rating widget Demo2 Page</title>
	
	<!-- demo page css -->
	<link rel="stylesheet" type="text/css" media="screen" href="css/demos.css?b38"/>

	<!-- demo page js -->
	<script type="text/javascript" src="js/jquery.min.js?v=1.4.2"></script>
	<script type="text/javascript" src="js/jquery-ui.custom.min.js?v=1.8"></script>
	
	<!-- Star Rating widget stuff here... -->
	<script type="text/javascript" src="js/jquery.ui.stars.js?v=3.0.0b38"></script>
	<link rel="stylesheet" type="text/css" href="css/jquery.ui.stars.css?v=3.0.0b38"/>
	<script type="text/javascript">
		$(function(){
			$("#ratings").children().not("select").hide();

			// Create target element for onHover titles
			$caption = $("<span/>");

			$("#ratings").stars({
				inputType: "select",
				captionEl: $caption, // point to our newly created element
				callback: function(ui, type, value)
				{
					$.post("demo2.php", {rate: value}, function(data)
					{
						$("#ajax_response").html(data);
					});
				}

			});

			// Make it available in DOM tree
			$caption.appendTo("#ratings");
		});
	</script>

</head>

<body>


	<div class="pageDesc">
		<p>
			Basic example with SELECT element and hovering caption
		</p>
	</div>


	<div class="pageBody">
		<h4>Basic SELECT (<a href="demo2a.html?b38" class="">before</a>|<a href="demo2b.html?b38" class="unlink">after</a>)</h4>


		<form id="ratings" action="demo2.php" method="post">

			<select name="rate">
				<option value="1">Very poor</option>
				<option value="2">Not that bad</option>
				<option value="3">Average</option>
				<option value="4">Good</option>
				<option value="5">Perfect</option>
			</select>

			<input type="submit" value="Rate it!" />

		</form>

		<p id="ajax_response"></p>
	</div>


</body>
</html>
